//去授权
export const toAuthorize = () => {
  const client_id = '8165297168701105'
  const redirect_uri = process.env.site+'forumsapp/loginOauth.php'
  const scope = 'user:read thread:read node:read conversation:read alert:read thread:write'
  const url = process.env.site+`oauth2/authorize?response_type=code&client_id=${client_id}&redirect_uri=${redirect_uri}&scope=${scope}&state=STATE`
  window.location.href = url
}

//清除token
export function clearToken() {
  localStorage.removeItem('oauth_token')
  console.log('Token 已清除')
}
